var t = require;
var e = module;
var o = exports;
var i, n = this && this.__extends || (i = function(t, e) {
    return (i = Object.setPrototypeOf || {
        __proto__: []
    }
    instanceof Array &&
    function(t, e) {
        t.__proto__ = e
    } ||
    function(t, e) {
        for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o])
    })(t, e)
},
function(t, e) {
    function o() {
        this.constructor = t
    }
    i(t, e),
    t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
}),
a = this && this.__decorate ||
function(t, e, o, i) {
    var n, a = arguments.length,
    r = a < 3 ? e: null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
    else for (var s = t.length - 1; s >= 0; s--)(n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
    return a > 3 && r && Object.defineProperty(e, o, r),
    r
};
Object.defineProperty(o, "__esModule", {
    value: !0
});
var r = t("GlobalUserData"),
s = t("HallConstant"),
l = t("BroadCastMessage"),
c = t("NativeManager"),
d = t("Util"),
h = t("Global"),
p = t("RedPointControl "),
u = cc._decorator,
f = u.ccclass,
m = u.property,
_ = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.panel_native = null,
        e.nodeNative = null,
        e.btn_close = null,
        e
    }
    return n(e, t),
    e.prototype.start = function() {
        var t = this;
        d.Util.hideHallBanner(),
        d.Util.showBanner(),
        this.panel_native.active = !1,
        this.btn_close.x = 120;
        var e = r.default.nTotalGame % 6;
        d.Util.is_VIVO() && !r.default.bAuditMode && r.default.nativeMistakeBannerList[e] ? d.Util.showNativeSupply(this.nodeNative, this.panel_native,
        function() {
            t.btn_close.x = 70
        }) : d.Util.is_OPPO() && r.default.btnShowAdEnabled && !r.default.bAuditMode ? d.Util.showNativeSupply(this.nodeNative, this.panel_native,
        function() {
            t.btn_close.x = 70
        }) : (this.panel_native.active = !1, this.nodeNative.active = !1),
        d.Util.hideSingleCustomAd(!0),
        p.RedPointControl.getInstance().cal(h.RedPointCalKey.Depot)
    },
    e.prototype.onEnable = function() {
        d.Util.show_VerticalCustomAd(!1),
        d.Util.show_VerticalCustomAd(!0),
        d.Util.is_233() && c.default.instance.showFullVideoAd()
    },
    e.prototype.onDisable = function() {
        d.Util.hide_VerticalCustomAd(!1),
        d.Util.hide_VerticalCustomAd(!0)
    },
    e.prototype.onClickShowAd = function() {
        d.Util.clickNativeSupply()
    },
    e.prototype.close = function() {
        d.Util.showSingleCustomAd(),
        l.default.getInstance().SendMessage(s.Broadcast_Func.Audio, s.Audio_ID.btn_click),
        this.node.destroy(),
        d.Util.hideBanner(),
        p.RedPointControl.getInstance().cal(h.RedPointCalKey.Depot),
        d.Util.showHallBanner()
    },
    a([m(cc.Node)], e.prototype, "panel_native", void 0),
    a([m(cc.Node)], e.prototype, "nodeNative", void 0),
    a([m(cc.Node)], e.prototype, "btn_close", void 0),
    a([f], e)
} (cc.Component);
o.default = _